<template>
  <el-container class="home-container">
    <!-- 头部区域 -->
    <el-header >电商后台管理系统<el-button type="info" @click="logout">退出</el-button></el-header>
    <!-- 页面主体区域 -->
    <el-container>
      <!-- 侧边栏区域 -->
      <el-aside width="200px">Aside</el-aside>
      <!-- 右边内容区域 -->
      <el-main>Main</el-main>
    </el-container>
</el-container>

</template>

<script>
export default {
  methods: {
    // 退出登录
    logout () {
      // 清除token
      window.sessionStorage.removeItem('token')
      // 跳转到登录页
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="less" scoped>
.home-container {
  height: 100%;
}
.el-header {
  background-color: #363D40;
}

.el-aside {
  background-color: #333744;
}

.el-main {
  background-color: #EAEDF1;
}
</style>
